import theAxios from 'axios'

const axios = theAxios.create({
	baseURL: 'http://localhost/api',
	timeout: 20000
})

// 可添加拦截器

export default ({url, method  = 'GET', params = {}, data = {}, headers = {}}) => {
	return axios({
		url: url,
		method: method,
		params: params,
		data: data,
		headers: headers
	})
}